<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- Bootstrap CSS-->
    <link rel="stylesheet" href="${pageContext.request.contextPath}/assets/vendor/bootstrap/css/bootstrap.css">
    <!-- Font Awesome CSS-->
    <link rel="stylesheet"
          href="${pageContext.request.contextPath}/assets/vendor/font-awesome/css/font-awesome.min.css">
    <!-- Custom Font Icons CSS-->
    <link rel="stylesheet" href="${pageContext.request.contextPath}/assets/css/font.css">
    <!-- theme stylesheet-->
    <link rel="stylesheet" href="${pageContext.request.contextPath}/assets/css/style.default.css" id="theme-stylesheet">
    <!-- Custom stylesheet - for your changes-->
    <link rel="stylesheet" href="${pageContext.request.contextPath}/assets/css/custom.css">
    <title>会议详情</title>
    <style>

        .myTitle > input {
            float: right;
            margin-left: 15px;
        }

    </style>
</head>
<body>
<%@include file="public_jsp/header.jsp" %>

<div class="d-flex align-items-stretch">
    <!-- Sidebar Navigation-->
    <%@include file="public_jsp/sidebar.jsp" %>
    <!-- Sidebar Navigation end-->
    <div class="page-content">
        <div class="page-header">
            <div class="container-fluid">
                <h2 class="h5 no-margin-bottom">会议详情</h2>
            </div>
        </div>

        <section class="no-padding-bottom">

            <div class="myTitle">
                <h3 class="text-center">${requestScope.conDetail.title}</h3>
                <%--<input type="submit" value="取消会议" class="btn btn-danger">--%>
                <input type="submit" value="参加会议" class="btn btn-info " id="attend" data-id="${requestScope.conDetail.id}">

            </div>

            <div class="myContent">
                <p class="h6"><strong>部门：</strong>${requestScope.conDetail.deptName}</p>
                <p class="h6"><strong>应到：</strong>${requestScope.total}<span>人</span></p>
                <p class="h6"><strong>实到：</strong>${requestScope.attend}<span>人</span></p>
                <p class="h6"><strong>未到：</strong>${requestScope.absent}<span>人</span></p>
                <textarea style="padding: 2px" disabled="disabled" class="form-control" rows="11">
                    ${requestScope.conDetail.content}
                </textarea>
            </div>

            <div class="text-right myList">
                <p>日期：${requestScope.conDetail.publishDate}</p>
            </div>
        </section>

        <%@include file="public_jsp/foot.jsp" %>
    </div>
</div>

<!-- JavaScript files-->
<script src="${pageContext.request.contextPath}/assets/vendor/jquery/jquery.min.js"></script>
<script src="${pageContext.request.contextPath}/assets/vendor/popper.js/umd/popper.min.js"></script>
<script src="${pageContext.request.contextPath}/assets/vendor/bootstrap/js/bootstrap.min.js"></script>
<script src="${pageContext.request.contextPath}/assets/vendor/jquery.cookie/jquery.cookie.js"></script>
<script src="${pageContext.request.contextPath}/assets/vendor/chart.js/Chart.min.js"></script>
<script src="${pageContext.request.contextPath}/assets/vendor/jquery-validation/jquery.validate.min.js"></script>
<script src="${pageContext.request.contextPath}/assets/js/charts-home.js"></script>
<script src="${pageContext.request.contextPath}/assets/js/front.js"></script>
<script src="${pageContext.request.contextPath}/assets/js/custom.js"></script>
<script>

    <%--var val = $(".attend").attr("data-id").val();
    $(".attend").click(function () {
        //点击参加会议就当他参加过了会议
        console.log("点击了会议"+val);
        window.location.href = contextPath + '/meeting/joinMeeting?cId=' + val;
    });--%>
    $(function () {
        var contextPath = $("#contextPath").val();
        $("#attend").click(function () {
            var uId = $(this).attr("data-id");
            console.log(uId);
            window.location.href = contextPath+"/meeting/joinMeeting?cId="+uId;
        })
    })

</script>

</body>
</html>